package com.example.webdemo.service;

import com.example.webdemo.model.ArticlePopularity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zp
 * @version 1.0
 * @description: ArticleService
 * @date 2023/7/31 19:06
 */
public interface ArticlePopularityService {
    int deleteByPrimaryKey(Integer id);

    int insert(ArticlePopularity record);

    int insertSelective(ArticlePopularity record);

    ArticlePopularity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ArticlePopularity record);

    int updateByPrimaryKey(ArticlePopularity record);

    List<ArticlePopularity> selectAll();

    ArticlePopularity selectByEndorseIdAndType(Integer articleInfoId,Integer endorseId, Integer endorseType);

    Integer selectByUserIdAndType(Integer userId, Integer endorseType);

    List<Integer> selectByUserIdAndTypeIds(Integer userId, Integer endorseType);

    boolean addArticlePopularity(Integer id, Integer type,Integer endorseId, Integer userId);

    boolean deleteByArticleIdAndType(Integer articleInfoId, Integer endorseId, Integer type);
}
